#if !defined(__APP_BLUETOOTH_H__)
#define __APP_BLUETOOTH_H__

#include "app_serial.h"
#include "app_message.h"

typedef enum
{
    BT_BaudRate_9600 = '4',
    BT_BaudRate_19200 = '5',
    BT_BaudRate_38400 = '6',
    BT_BaudRate_57600 = '7',
    BT_BaudRate_115200 = '8'
} BT_BaudRate;

/**
 * @brief 检查蓝牙芯片状态
 *
 * @return int
 */
int app_bluetooth_stat(SerialDevice *serial_device);

int app_bluetooth_setBaudRate(SerialDevice *serial_device, BT_BaudRate baud_rate);

int app_bluetooth_reset(SerialDevice *serial_device);

int app_bluetooth_setNetID(SerialDevice *serial_device, char *net_id);

int app_bluetooth_setMAddr(SerialDevice *serial_device, char *m_addr);

int app_bluetooth_setConnectionType(SerialDevice *serial_device);

int app_bluetooth_preWrite(Device *device, void* data, int len);

int app_bluetooth_postRead(Device *device, void* data, int len);

#endif // __APP_BLUETOOTH_H__
